home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Linux
/
Kubuntu 8.10
/
kubuntu-8.10-desktop-i386.iso
/
casper
/
filesystem.squashfs
/
etc
/
init.d
/
screen-cleanup
< prev
next >
Wrap
Text File
|
2008-06-13
|
918b
|
41 lines
#!/bin/sh
# $Id: init,v 1.3 2004/03/16 01:43:45 zal Exp $
#
# Script to remove stale screen named pipes on bootup.
#
### BEGIN INIT INFO
# Provides: screen-cleanup
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: S
# Default-Stop:
# Short-Description: screen sessions cleaning
### END INIT INFO
set -e
SCREENDIR=/var/run/screen
case "$1" in
start)
if test -L $SCREENDIR || ! test -d $SCREENDIR; then
rm -f $SCREENDIR
mkdir $SCREENDIR
chown root:utmp $SCREENDIR
fi
find $SCREENDIR -type p -print0 | xargs -0r rm -f --
# If the local admin has used dpkg-statoverride to install screen setuid,
# change the permissions of $SCREENDIR accordingly
if [ `stat -c%a /usr/bin/screen` -ge 4000 ]; then
chmod 0755 $SCREENDIR
else
chmod 0775 $SCREENDIR
fi
;;
stop|restart|reload|force-reload)
;;
esac
exit 0